<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
    <title>LuaApp项目接口文档</title>
    <link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>

<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->


<div id="main">


<!-- Menu -->

<div id="navigation">
<br/>
<h1>LuaApp</h1>

<ul>
  <li><a href="../index.html">Index</a></li>
</ul>

<h2>Contents</h2>
<ul>
<li><a href="#Methods">Methods</a></li>
</ul>


<h2>Classes</h2>
<ul class="nowrap">
  <li><a href="../classes/ActivityIndicatorView.html">ActivityIndicatorView</a></li>
  <li><a href="../classes/AlertView.html">AlertView</a></li>
  <li><a href="../classes/Application.html">Application</a></li>
  <li><a href="../classes/AudioEngine.html">AudioEngine</a></li>
  <li><a href="../classes/Button.html">Button</a></li>
  <li><a href="../classes/CaptureView.html">CaptureView</a></li>
  <li><a href="../classes/CheckBox.html">CheckBox</a></li>
  <li><a href="../classes/ClippingView.html">ClippingView</a></li>
  <li><a href="../classes/Control.html">Control</a></li>
  <li><a href="../classes/DatePickerView.html">DatePickerView</a></li>
  <li><a href="../classes/Device.html">Device</a></li>
  <li><a href="../classes/DownloadManager.html">DownloadManager</a></li>
  <li><a href="../classes/DrawView.html">DrawView</a></li>
  <li><a href="../classes/DrawerController.html">DrawerController</a></li>
  <li><a href="../classes/FileUtils.html">FileUtils</a></li>
  <li><a href="../classes/GifView.html">GifView</a></li>
  <li><a href="../classes/HttpClient.html">HttpClient</a></li>
  <li><a href="../classes/HttpRequest.html">HttpRequest</a></li>
  <li><a href="../classes/Image.html">Image</a></li>
  <li><a href="../classes/ImageView.html">ImageView</a></li>
  <li><a href="../classes/Label.html">Label</a></li>
  <li><a href="../classes/LinearView.html">LinearView</a></li>
  <li><strong>ListView</strong></li>
  <li><a href="../classes/ListViewCell.html">ListViewCell</a></li>
  <li><a href="../classes/NavController.html">NavController</a></li>
  <li><a href="../classes/Progress.html">Progress</a></li>
  <li><a href="../classes/Slider.html">Slider</a></li>
  <li><a href="../classes/Stepper.html">Stepper</a></li>
  <li><a href="../classes/Switch.html">Switch</a></li>
  <li><a href="../classes/TabBarController.html">TabBarController</a></li>
  <li><a href="../classes/TextField.html">TextField</a></li>
  <li><a href="../classes/TextView.html">TextView</a></li>
  <li><a href="../classes/UILoader.html">UILoader</a></li>
  <li><a href="../classes/View.html">View</a></li>
  <li><a href="../classes/ViewController.html">ViewController</a></li>
  <li><a href="../classes/WebView.html">WebView</a></li>
  <li><a href="../classes/Window.html">Window</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
  <li><a href="../modules/Animation.html">Animation</a></li>
  <li><a href="../modules/class.html">class</a></li>
  <li><a href="../modules/constants.html">constants</a></li>
  <li><a href="../modules/crossapp.html">crossapp</a></li>
  <li><a href="../modules/cjson.html">cjson</a></li>
  <li><a href="../modules/mobdebug.html">mobdebug</a></li>
</ul>
<h2>Topics</h2>
<ul class="">
  <li><a href="../topics/readme.md.html">readme</a></li>
  <li><a href="../topics/layout.md.html">layout</a></li>
</ul>

</div>

<div id="content">

<h1>Class <code>ListView</code></h1>
<p>列表视图</p>
<p>

</p>


<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
	<tr>
	<td class="name" nowrap><a href="#ListView:new">ListView:new ()</a></td>
	<td class="summary">创建listView</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListViewDataSource">ListView:setListViewDataSource (table)</a></td>
	<td class="summary">设置数据源</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListViewDelegate">ListView:setListViewDelegate (table)</a></td>
	<td class="summary">设置代理</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:reloadViewSizeData">ListView:reloadViewSizeData ()</a></td>
	<td class="summary">重新计算视图尺寸，当尺寸变动时调用</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:clearData">ListView:clearData ()</a></td>
	<td class="summary">清除数据</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:reloadData">ListView:reloadData ()</a></td>
	<td class="summary">重新加载数据</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:dequeueReusableCellWithIdentifier">ListView:dequeueReusableCellWithIdentifier (id)</a></td>
	<td class="summary">根据id获取复用的cell</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setAllowsSelection">ListView:setAllowsSelection (is_allow)</a></td>
	<td class="summary">设置是否允许选中</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setAllowsMultipleSelection">ListView:setAllowsMultipleSelection (is_allow)</a></td>
	<td class="summary">设置是否允许同时选中多个</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setSelectAtIndex">ListView:setSelectAtIndex (index)</a></td>
	<td class="summary">设置选中</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setUnSelectAtIndex">ListView:setUnSelectAtIndex (index)</a></td>
	<td class="summary">设置不选中</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setShowsScrollIndicators">ListView:setShowsScrollIndicators (is_show)</a></td>
	<td class="summary">设置是否显示指示器</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:cellForRowAtIndex">ListView:cellForRowAtIndex (index)</a></td>
	<td class="summary">获取指定行的cell</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getOrientation">ListView:getOrientation ()</a></td>
	<td class="summary">获取水平还是垂直</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setOrientation">ListView:setOrientation (0)</a></td>
	<td class="summary">设置水平还是垂直</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListHeaderView">ListView:setListHeaderView (view)</a></td>
	<td class="summary">设置头部视图</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getListHeaderView">ListView:getListHeaderView ()</a></td>
	<td class="summary">获取头部视图</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListFooterView">ListView:setListFooterView (view)</a></td>
	<td class="summary">设置脚视图</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getListFooterView">ListView:getListFooterView ()</a></td>
	<td class="summary">获取脚部视图</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setSeparatorColor">ListView:setSeparatorColor (color)</a></td>
	<td class="summary">设置分隔的颜色</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getSeparatorColor">ListView:getSeparatorColor ()</a></td>
	<td class="summary">获取分隔的颜色</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListHeaderHeight">ListView:setListHeaderHeight (height)</a></td>
	<td class="summary">设置头部视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getListHeaderHeight">ListView:getListHeaderHeight ()</a></td>
	<td class="summary">获取头部视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setListFooterHeight">ListView:setListFooterHeight (height)</a></td>
	<td class="summary">设置脚部视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getListFooterHeight">ListView:getListFooterHeight ()</a></td>
	<td class="summary">获取脚部视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:setSeparatorViewHeight">ListView:setSeparatorViewHeight (height)</a></td>
	<td class="summary">设置分隔视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:getSeparatorViewHeight">ListView:getSeparatorViewHeight ()</a></td>
	<td class="summary">获取分隔视图的高度</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:isAllowsSelection">ListView:isAllowsSelection ()</a></td>
	<td class="summary">是否允许选择</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:isAllowsMultipleSelection">ListView:isAllowsMultipleSelection ()</a></td>
	<td class="summary">是否允许多选</td>
	</tr>
	<tr>
	<td class="name" nowrap><a href="#ListView:switchPCMode">ListView:switchPCMode (is_switch)</a></td>
	<td class="summary">switchPCMode</td>
	</tr>
</table>

<br/>
<br/>


    <h2 class="section-header "><a name="Methods"></a>Methods</h2>

    <dl class="function">
    <dt>
    <a name = "ListView:new"></a>
    <strong>ListView:new ()</strong>
    </dt>
    <dd>
    创建listView



    <h3>Returns:</h3>
    <ol>

        ListView
    </ol>




</dd>
    <dt>
    <a name = "ListView:setListViewDataSource"></a>
    <strong>ListView:setListViewDataSource (table)</strong>
    </dt>
    <dd>
    设置数据源


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">table</span>



        </li>
    </ul>




    <h3>Usage:</h3>
    <ul>
        <pre class="example">listView:setListViewDataSource {
 numberOfIndex =<span class="keyword">function</span>() <span class="keyword">return</span> <span class="number">10</span> <span class="keyword">end</span>,
  heightForIndex = <span class="keyword">function</span>(index) <span class="keyword">return</span> <span class="number">40</span> <span class="keyword">end</span>,
  cellAtIndex = <span class="keyword">function</span>(index) <span class="keyword">end</span>,
  willDisplayCellAtIndex = <span class="keyword">function</span>(index) <span class="keyword">end</span>,
}</pre>
    </ul>

</dd>
    <dt>
    <a name = "ListView:setListViewDelegate"></a>
    <strong>ListView:setListViewDelegate (table)</strong>
    </dt>
    <dd>
    设置代理


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">table</span>



        </li>
    </ul>




    <h3>Usage:</h3>
    <ul>
        <pre class="example">listView:setListViewDelegate {
 didSelectCellAtIndex =<span class="keyword">function</span>(index)  <span class="keyword">end</span>,
  didDeselectCellAtIndex = <span class="keyword">function</span>(index)  <span class="keyword">end</span>,
}</pre>
    </ul>

</dd>
    <dt>
    <a name = "ListView:reloadViewSizeData"></a>
    <strong>ListView:reloadViewSizeData ()</strong>
    </dt>
    <dd>
    重新计算视图尺寸，当尺寸变动时调用







</dd>
    <dt>
    <a name = "ListView:clearData"></a>
    <strong>ListView:clearData ()</strong>
    </dt>
    <dd>
    清除数据







</dd>
    <dt>
    <a name = "ListView:reloadData"></a>
    <strong>ListView:reloadData ()</strong>
    </dt>
    <dd>
    重新加载数据







</dd>
    <dt>
    <a name = "ListView:dequeueReusableCellWithIdentifier"></a>
    <strong>ListView:dequeueReusableCellWithIdentifier (id)</strong>
    </dt>
    <dd>
    根据id获取复用的cell


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">id</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setAllowsSelection"></a>
    <strong>ListView:setAllowsSelection (is_allow)</strong>
    </dt>
    <dd>
    设置是否允许选中


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">is_allow</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setAllowsMultipleSelection"></a>
    <strong>ListView:setAllowsMultipleSelection (is_allow)</strong>
    </dt>
    <dd>
    设置是否允许同时选中多个


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">is_allow</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setSelectAtIndex"></a>
    <strong>ListView:setSelectAtIndex (index)</strong>
    </dt>
    <dd>
    设置选中


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">index</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setUnSelectAtIndex"></a>
    <strong>ListView:setUnSelectAtIndex (index)</strong>
    </dt>
    <dd>
    设置不选中


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">index</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setShowsScrollIndicators"></a>
    <strong>ListView:setShowsScrollIndicators (is_show)</strong>
    </dt>
    <dd>
    设置是否显示指示器


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">is_show</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:cellForRowAtIndex"></a>
    <strong>ListView:cellForRowAtIndex (index)</strong>
    </dt>
    <dd>
    获取指定行的cell


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">index</span>



        </li>
    </ul>

    <h3>Returns:</h3>
    <ol>

        list_cell
    </ol>




</dd>
    <dt>
    <a name = "ListView:getOrientation"></a>
    <strong>ListView:getOrientation ()</strong>
    </dt>
    <dd>
    获取水平还是垂直



    <h3>Returns:</h3>
    <ol>

        0 水平 1 垂直
    </ol>




</dd>
    <dt>
    <a name = "ListView:setOrientation"></a>
    <strong>ListView:setOrientation (0)</strong>
    </dt>
    <dd>
    设置水平还是垂直


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">0</span>
         水平 1 垂直
        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:setListHeaderView"></a>
    <strong>ListView:setListHeaderView (view)</strong>
    </dt>
    <dd>
    设置头部视图


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">view</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getListHeaderView"></a>
    <strong>ListView:getListHeaderView ()</strong>
    </dt>
    <dd>
    获取头部视图



    <h3>Returns:</h3>
    <ol>

        view
    </ol>




</dd>
    <dt>
    <a name = "ListView:setListFooterView"></a>
    <strong>ListView:setListFooterView (view)</strong>
    </dt>
    <dd>
    设置脚视图


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">view</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getListFooterView"></a>
    <strong>ListView:getListFooterView ()</strong>
    </dt>
    <dd>
    获取脚部视图



    <h3>Returns:</h3>
    <ol>

        view
    </ol>




</dd>
    <dt>
    <a name = "ListView:setSeparatorColor"></a>
    <strong>ListView:setSeparatorColor (color)</strong>
    </dt>
    <dd>
    设置分隔的颜色


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">color</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getSeparatorColor"></a>
    <strong>ListView:getSeparatorColor ()</strong>
    </dt>
    <dd>
    获取分隔的颜色



    <h3>Returns:</h3>
    <ol>

        color
    </ol>




</dd>
    <dt>
    <a name = "ListView:setListHeaderHeight"></a>
    <strong>ListView:setListHeaderHeight (height)</strong>
    </dt>
    <dd>
    设置头部视图的高度


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">height</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getListHeaderHeight"></a>
    <strong>ListView:getListHeaderHeight ()</strong>
    </dt>
    <dd>
    获取头部视图的高度



    <h3>Returns:</h3>
    <ol>

        height
    </ol>




</dd>
    <dt>
    <a name = "ListView:setListFooterHeight"></a>
    <strong>ListView:setListFooterHeight (height)</strong>
    </dt>
    <dd>
    设置脚部视图的高度


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">height</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getListFooterHeight"></a>
    <strong>ListView:getListFooterHeight ()</strong>
    </dt>
    <dd>
    获取脚部视图的高度



    <h3>Returns:</h3>
    <ol>

        height
    </ol>




</dd>
    <dt>
    <a name = "ListView:setSeparatorViewHeight"></a>
    <strong>ListView:setSeparatorViewHeight (height)</strong>
    </dt>
    <dd>
    设置分隔视图的高度


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">height</span>



        </li>
    </ul>





</dd>
    <dt>
    <a name = "ListView:getSeparatorViewHeight"></a>
    <strong>ListView:getSeparatorViewHeight ()</strong>
    </dt>
    <dd>
    获取分隔视图的高度



    <h3>Returns:</h3>
    <ol>

        height
    </ol>




</dd>
    <dt>
    <a name = "ListView:isAllowsSelection"></a>
    <strong>ListView:isAllowsSelection ()</strong>
    </dt>
    <dd>
    是否允许选择



    <h3>Returns:</h3>
    <ol>

        is_allow
    </ol>




</dd>
    <dt>
    <a name = "ListView:isAllowsMultipleSelection"></a>
    <strong>ListView:isAllowsMultipleSelection ()</strong>
    </dt>
    <dd>
    是否允许多选



    <h3>Returns:</h3>
    <ol>

        is_allow
    </ol>




</dd>
    <dt>
    <a name = "ListView:switchPCMode"></a>
    <strong>ListView:switchPCMode (is_switch)</strong>
    </dt>
    <dd>
    switchPCMode


    <h3>Parameters:</h3>
    <ul>
        <li><span class="parameter">is_switch</span>



        </li>
    </ul>





</dd>
</dl>


</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.6</a></i>
<i style="float:right;">Last updated 2017-04-25 21:28:27 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>
